module.exports = {
  apps: [
    {
      name: "www",
      script: 'bin/www',
      watch: false, //这个监听关的原因 是日志生成的时候会更新日志 触发监听
      instances: "max",
      exec_mode: "cluster",
      instance_var: "INSTANCE_ID"
    }
  ],

  deploy: {
    production: {
      user: 'SSH_USERNAME',
      host: 'SSH_HOSTMACHINE',
      ref: 'origin/master',
      repo: 'GIT_REPOSITORY',
      path: 'DESTINATION_PATH',
      'pre-deploy-local': '',
      'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production',
      'pre-setup': ''
    }
  }
};
